home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1998 September
/
CHIP Eylül 1998.iso
/
Slackwar
/
docs
/
Optical-Disk-HOWTO
< prev
next >
Wrap
Text File
|
1997-12-28
|
16KB
|
345 lines
Linux - Optical Disk HOWTO
Skip Rye, Skip_Rye@faneuil.com
v1.4, 22 December 1997
This document describes the installation and configuration of optical
disk drives for Linux. Currently, the only drive covered well is the
Panasonic LF1000 PD Phase change optical drive with the SCSI-II inter¡
face. Please, if any one has experiences with optical storage under
Linux, send it and I will update it in SGML and forward it to the
Linux community.
1. Disclaimer
Neither the author nor the distributors of this HOWTO are in any way
responsible for physical, financial, moral or any other type of damage
incurred by following the suggestions in this text.
2. Copyright
The "Optical Disk-HOWTO" and "LF1000 mini-HOWTO" are copyrighted.
2.1. LF1000 mini-HOWTO
(C) 1996,1997 by Skip Rye, abr@brspc_0064.msd.ray.com
2.2. Optical Disk-HOWTO
(C) 1997 by Skip Rye, abr@brspc_0064.msd.ray.com
Linux HOWTO documents may be reproduced and distributed in whole or in
part, in any medium physical or electronic, as long as this copyright
notice is retained on all copies. Commercial redistribution is allowed
and encouraged. The author, however, would like to be notified of any
such distributions. All translations, derivative works, or aggregate
works incorporating any Linux HOWTO documents must be covered under
this copyright notice. In other words, you may not produce a
derivative work from a HOWTO and impose additional restrictions on its
distribution. Exceptions to these rules may be granted under certain
conditions. In short we wish to promote dissemination of this
information through as many channels as possible. However, we do wish
to retain copyright on the HOWTO documents, and would like to be
notified of any plans to redistribute the HOWTOs. Should you have any
questions, please contact Greg Hankins, the Linux HOWTO coordinator,
at gregh@sunsite.unc.edu. You may finger his address for phone number
and additional contact information.
3. Phase Change Optical Technology
3.1. Introduction
Optical Phase Change technology is used to create "In Phase" or "Out
of Phase" bits on a special media for phase change writing. The drive
uses a LASER of different power levels or LASER intensities to produce
this effect. One power level allows the media to flow into a
crystalline form while the other creates an "Out of Phase" condition.
The crystallized areas reflect the read Lasers beam with a different
coefficient of reflectivity than the non-crystallized areas. Thus,
data can be read from the disk.
What makes the phase change optical disk special is that it the disk
is formated with concentric cylinders or tracks with each track being
sectored much like a magnetic disk or read/write optical disk. The
tracks are very close so a lot of data can be stored on a disk. This
is different from a CD-ROM in that it gives your system the look and
feel of a magnetic disk. CD-ROMs have a spiraling track much like a
audio record. Having tracks and sectors alone would not make the phase
change drive special from optical disk but the drive has some very
special properties; The phase change drive allows for direct overwrite
of data which magneto optical can't do inexpensively and the media has
the very special property of NOT being susceptible to magnetic fields
or as sensitive to static discharge which gives the media a very long
shelf life.
3.2. Panasonic LF1000
3.2.1. POINTS OF INTEREST
╖ Read/Write optical disk.
╖ Can read CD-ROMs at 4X speed.
╖ Can read Kodak PhotoCDs.
╖ Media has a 15 Year shelf life.
╖ SCSI-2 Interface.
╖ Track/sector format as opposed to CD-ROMs spiraling record format.
╖ 165ms access time - much better than a tape file restore.
╖ 650Mb data storage per diskette.
╖ Diskettes are about $50 each.
3.2.2. THINGS YOU SHOULD KNOW
╖ Optical disk format not compatible with any other disk drive.
╖ Vendors don't seem to support UNIX very well - marketing is
targeted for DOS/Windows and Macintosh.
╖ Do NOT purchase the PD drive which uses the parallel port interface
- To my knowledge there is no Linux driver for it.
3.2.3. Installation
The LF1000 is SCSI-2 compatible device. It features a block size of
512 bytes and is compatible with the Linux SCSI drivers. This drive
was installed on a PC compatible AMD 100MHZ 486 with an Adaptic 1542C
SCSI bus-master controller. To install and mount a disk the following
steps were taken;
3.2.4. Installation steps
╖ Install the drive and set the SCSI address to not interfere with
other SCSI devices. Reconnect all cabling.
╖ Boot the computer. Your SCSI controller should note the new drive.
╖ During the Linux kernel boot, you should see an additional SCSI
device. In my case, having a magnetic system disk for device
/dev/sda it shows up as /dev/sdb.
╖ I did NOT partition the device because fdisk issued an overwrite
warning and I did not want to change anything from a dosemu
standpoint.
╖ mkfs -t ext2 /dev/sdb
╖ mkdir /pd
╖ mount -t ext2 -o ro,suid,dev,exec,auto,nouser,async /dev/sdb /pd -
Read only
╖ mount -t ext2 -o defaults /dev/sdb /pd - Mount drive W/R
Your ready to "Rock'n'Roll"
3.2.5. Usage hints
╖ The media which comes with the drive is reported be re-writable
about 500,000 times. This means that it is not advisable to install
a live operating system such as Linux on the phase change optical
drive. These live operating systems tend to cache processes to and
from disk. Over time this can easily approach the phase change
media life.
╖ Mount drive read only as much as possible.
╖ When writing to the drive do so in large chunks. This will help
reduce any file fragmentation which will require more read seeks.
╖ This is however an excellent media for backups, gifs, mpeg or
storing large programs which you don't use that often. The restore
from backup is much faster that tape. Backups can be performed
using the cp -rp command without the need for the ftape driver.
This however, will replace symbolic links with the actual file.
╖ If while using the PD for writing, You find that the file you just
wrote to the disk are not there, chances are that the disk write
protect tab is in write protect mode and you mounted it in
read/write mode.
3.3. Additional Configuration concerns by Jeff Rooze
Hello,
I read your article on configuring the Panasonic LF-1000 for Linux. I
have configured my system so that the optical drive has its own device
name and the CD-ROM has its own device name. This has allowed me to
mount either media at any time. I do not require any media in the
drive when I boot Linux. Also I am using the optical drive as an ext2
formatted media.
I had a couple of minor difficulties in doing so.
First, I had configured my hard drive at SCSI ID 6 and my PD at SCSI
ID 4. (I wanted to have the hard drive at a higher priority that the
PD). This caused a problem with the Linux SCSI driver. The driver
scans the SCSI devices from the Lower SCSI id's to the higher (eg: 0
.. 6). Consequently my logical device names were assigned differently
depending on which type of media was installed in the PD drive. This
caused a big problem. My Linux partition is on my SCSI hard drive and
the root device name would change! I corrected this problem by
modifying the software in the kernel SCSI driver to scan the devices
in reverse order.
Second, the distribution Linux kernel does not scan all SCSI LUNS.
The PD/CD drive has a mode that establishes the CD-ROM at LUN 1 and
the PD at LUN 0. This mode is selected by the configuration switches
on the PD/CD drive. Switch #2 should be down (off?). If this switch is
up (on?), the signature of the device is dependent upon the media that
is installed and it only reports this device on LUN 0. If no media is
installed I think it defaults to CD-ROM. I am using an Future Domain
16-xx SCSI interface card and the software in Linux kernel driver
supports an optical device signature when scanning the LUNS. I assume
that this is standard for most of the SCSI drivers. I reconfigured the
kernel to enable the "scan all LUNS" switch. The kernel then assigns
different device names for each device. The following is an excerpt
from by boot log. You will note a series of errors in this log. This
is because I did not have the optical media installed in the drive and
the driver was attempting to look at the partition table to determine
the block size. Fortunately it defaults to 512. I am planning on
modifying the Future Domain SCSI driver to not do this when it detects
the optical device.
> scsi0 <fdomain>: BIOS version 3.2 at 0xde000 using scsi id 7
> scsi0 <fdomain>: TMC-18C50 chip at 0x140 irq 12
> scsi0 : Future Domain TMC-16x0 SCSI driver, version 5.28
> scsi : 1 host.
> Vendor: CONNER Model: CP30545 545MB3.5 Rev: A9AF
> Type: Direct-Access ANSI SCSI revision: 02
> Detected scsi disk sda at scsi0, id 6, lun 0
> Vendor: MATSHITA Model: PD-1 LF-1000 Rev: A109
> Type: Optical Device ANSI SCSI revision: 02
> Detected scsi disk sdb at scsi0, id 4, lun 0
> Vendor: MATSHITA Model: PD-1 LF-1000 Rev: A109
> Type: CD-ROM ANSI SCSI revision: 02
> Detected scsi CD-ROM sr0 at scsi0, id 4, lun 1
> fdomain: Selection failed
> scsi : detected 1 SCSI cdrom 2 SCSI disks total.
> SCSI Hardware sector size is 512 bytes on device sda
> fdomain: REQUEST SENSE Key = 2, Code = 3a, Qualifier = 0
> last message repeated 3 times
> sdb : READ CAPACITY failed.
> sdb : status = 0, message = 00, host = 0, driver = 28
> sdb : extended sense code = 2
> sdb : block size assumed to be 512 bytes, disk size 1GB.
> .
> .
> .
> Partition check:
> sda: sda1 sda2 sda3
> scsidisk I/O error: dev 0810, sector 0
> unable to read partition table of device 0810
Third, I modified my file system table (/etc/fstab) to list each
device but do not attempt to auto mount when booting. I have included
an excerpt from my fstab. The most important options are the noauto,
rw(ro), and the checkpass flag.
To create a ext2 file system on the PD, I used the command "mkfs.ext2
-i 2048 /dev/sdb".
# fstab - List of file systems
#
# device mount type options dumpfrequency
checkpass
/dev/sdb /optd ext2 rw,user,suid,noauto,sync,exec,dev,umask=0 0 2
/dev/sr0 /dist iso9660 ro,user,suid,noauto,sync,exec,dev 0 2
After making these changes, I have had no problems with mounting
either media. All I need to do is to load the media and type "mount
/optd" or "mount /dist" and the system does all the rest.
I hope this information is useful.
Jeff
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\ Jeff Rooze -- http://www.treknet.net/~jrooze -- jrooze@treknet.net /
/ If builders built buildings the way some programmers write \
\ programs, then the first woodpecker that came along would destroy /
/ civilization. GERALD WEINBERG \
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I tried Jeff's suggestion. Here are the steps I performed;
╖ Modify my kernel using "make xconfig" in the /usr/src/linux
directory and installed it.
╖ Change the mode jumper on the PD drive to non-DOS mode. I soldered
a switch across the mode jumper connections and routed it the the
back panel. I figured out which switch position was the open
position and labeled this one for DOS. The other position is of
course Linux. So before I boot my system I decide which OS I'll be
using and set the switch accordingly. History shows it staying in
the Linux position more and more.
╖ Reboot your system. You should now see multiple LUN show up during
boot for the PD SCSI device number - It works great!!! If you have
an older kernel modify the "/usr/src/linux/drivers/scsi/config.in"
file.
╖ Update the fstab for both CD and PD drives.
╖ Use appropriate mount command.
╖ "df" to make sure your ready.
I did try moving my primary SCSI drive to 6 but experienced some
difficulties. Can't remember exactly what it was but it may have been
that my controller "Adaptec 1542" with "Corel SCSI" requires a
bootable disk and SCSI 0 for the BIOS install to work properly with
DOS. So I switched it back and enjoyed playing with my properly
install PD drive! With this configuration "workman" - the audio CD
player util - works fine.
4. Magneto Optical Technology
4.1. Introduction
Magneto optical drives use a "Far field" magnetic field and a laser to
change polarization of a magnetic media. The media is of such a nature
that it must be heated to the appropriate temperature before a
polarization change can happen - this is where the laser come in. A
high power write laser is used to heat the disk surface to the
appropriate temperature at which time the "Far field" can set the
polarization on the disk magnetic surface. After a short period of
time the disk surface cools and "locks" the polarization into place.
The read back I'm a little fuzzy on - someone please send me the
proper wording. I think a low power laser is used for read back and
the "H" field of the disk polarization interacts with the "E" and "H"
field of the incident laser to produce a reflective polarization which
will correspond to the disk bit polarization - I hope this is in the
ballpark, it's certainly no home run. Maybe a total strike out.
The use of a laser for polarization change allows the disk bit and
track densities to be higher than conventional "Flying" magnetic
heads. The "far field" means no more "head crashes" - that is assuming
your disk label doesn't peal off during the load or you don't leave
one of those sticky pads on the disk cartridge. Most media allows 650
Megs per platter and on some models both sides of the media is used
yielding 1.3Gig storage media - you must remove the media and flip it
over to use the other 650Megs though.
5. Optical Jukeboxes
I have no experience with optical jukeboxes with Linux!!!! I have had
experiences with Optical Jukeboxes under HP-UX. In this setup the the
Jukebox had a SCSI address of it's own. Each slot in the Jukebox had
an associated LUN number. A device name was assigned for each disk
slot A side and B side. The mount command was run against the
appropriate device name. I had a Jukebox with just one drive and 16
optical disk slots - 20 Gig. I thought it was going to be a real
hassle to write a disk mount manager to share this drive among users
until I discovered you can mount as many disk as you want and the
Jukebox driver takes care of arbitration - what a nice feature.
Granted, you only want archive type data here and your overall system
configuration to be such that not too many processes will be accessing
the Jukebox at the same time. The disk spin down, carriage load,
carriage move, carriage unload, carriage move to the next disk,
carriage next disk load, carriage move, optical drive load, and spin
up takes about 12 seconds - "seek-from-hell".